<template>
  <div>
    <van-nav-bar title="制作相册" left-arrow @click-left="onClickLeft"/>
    <div class="tab">
      <div class="tab1" v-for="(item,i) in list" :key="i">
        <p>{{item.mname}}</p>
        <p class="tab1_1">
          <span>{{item.prices}}</span>
          <span class="tab1_2" >
            <van-icon :name="iconname" @click="icon($event)" />
          </span>
        </p>
      </div>
     
    </div>
  </div>
</template>

<script>
export default {
  name: "Makealbum",
  data() {
    return {
      list:[
        {
          "mname":'宝宝成长相册',
          "prices":'￥199.9',
          "mid":"12"
        },
         {
          "mname":'标准6寸照片冲印',
          "prices":'￥0.5',
           "mid":"13"
        },
          {
          "mname":'宝宝成长相册',
          "prices":'￥199.9',
           "mid":"14"
        },
         {
          "mname":'标准6寸照片冲印',
          "prices":'￥0.5',
           "mid":"15"
        },
      ],
      iconname:'like-o'
    };
  },

  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    icon(e){
     if(e.target.className == 'van-icon van-icon-like'){
       e.target.className = 'van-icon van-icon-like-o'
     }else if(e.target.className == 'van-icon van-icon-like-o'){
       e.target.className = 'van-icon van-icon-like'
     }
     
    }
  }
};
</script>

<style scoped>
.tab{

  display: flex;
  flex-wrap: wrap;
  margin-left: 8px
}
.tab1 {
  font-size: 14px;
  height: 200px;
  width: 167px;
  background: #eeeeee;
  margin: 7px
}
.tab1_1 {
  width: 146px;
  height: 30px;
  margin-top: 142px;
  margin-left: 10px;
}
.tab1_2 {
  float: right;
}

</style>
